# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=knetwalk
pkgver=20.04.3
pkgrel=0
pkgdesc="Connect all the terminals to the server, in as few turns as possible"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://kde.org/applications/games/knetwalk/"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtdeclarative-dev kconfig-dev kconfigwidgets-dev kcoreaddons-dev kcrash-dev kdbusaddons-dev kdoctools-dev ki18n-dev ktextwidgets-dev kwidgetsaddons-dev kxmlgui-dev libkdegames-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/knetwalk-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="b1466213ff25b5e8352669e4fbc82da444897934faa21e27b758b15d65e12c59384c5edac6400700c57b52a59a67a9452687f834000694a93503887b576296f3  knetwalk-20.04.3.tar.xz"
